<?php
/*There is an offer mention in one shop as follows,
If you buy TV and Mixer, you will get discount of 20%
If you buy TV and Washing Machine OR Washing Machine and Mixer, you will get discount of 30%
If you buy all together (TV, Washing Machine and Mixer), you will discount of 40%

Please show the final cost in all the above three cases, if the rate as follows,
TV - Rs. 15000
Washing Machine - Rs. 17000
Mixer - Rs. 6000
*/
?>
<?php 
$tv=15000;
$wm =17000;
$mixer=6000;

if($tv && $mixer)
{
$tm = ($tv+$mixer)*(20/100);
echo $tm.'<br>';
 
}

if(($tv && $wm)||($wm && $mixer))
{
$tmmm=($wm+$mixer)*(30/100);
echo $tmmm.'<br>';
}

if($tv && $mixer && $wm)
{
$tmm = ($tv+$mixer+$wm)*(40/100);
echo $tmm.'<br>';
 
}
?>